﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.IO;
using System.Net;

namespace Fanfou
{
    /// <summary>
    /// HeyRice class
    /// </summary>
    partial class HeyRice
    {
        /// <summary>
        /// Main method
        /// </summary>
        /// <param name="args">Arguments</param>
        static void Main(string[] args)
        {
            Console.WindowWidth = 100;
            AppString.SetAppString();

            ShowBasicScreen();
            bool isUserValid = Login();

            while (!isUserValid)
            {
                ShowBasicScreen();
                Console.WriteLine();
                Console.WriteLine(AppString.SYSTEM_LOGIN_FAIL);
                Console.WriteLine();
                isUserValid = Login();
            }

            while (true)
            {
                isLogin = true;
                ShowBasicScreen();
                Console.WriteLine();
                Console.WriteLine(AppString.SYSTEM_MENU);
                Console.Write(AppString.SYSTEM_USER_COMMAND);
                int userInput = Console.ReadKey(true).KeyChar;

                switch (userInput)
                {
                    case 49:
                        SendMessages();
                        break;
                    case 50:
                        FindRencently();
                        break;
                    case 51:
                        CheckFriends();
                        break;
                    case 52:
                        ListFriends();
                        break;
                    case 53:
                        LanguageConfig();
                        break;
                    case 54:
                        SysConfig();
                        break;
                }
            }
        }
    }
}
